package com.hmdp.utils;

/**
 * @author: yp
 * @Description:
 * @creat:2022/10/31/9:31
 */
public interface ILock {

    /**
     * 尝试获取锁
     * @param timeoutSec 超时时间 释放锁
     * @return
     */
    boolean tryLock(long timeoutSec);

    /**
     * 释放锁
     */
    void unLock();
}
